package com.dcd.controller;

import com.dcd.pojo.Sales;
import com.dcd.service.SalesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/Sales")
@CrossOrigin
public class SalesController {

    @Autowired
    private SalesService salesService;

    @RequestMapping("/timeAll")
    public List<Sales> timeAll(){
        return salesService.timeAll();
    }

}
